package oom;

/**
 * Created by xu on 2021/12/5.
 */
public class JavaStackSOF {
    private int stackLength = 1;

    public void stackLeak(){
        stackLength++;
        stackLeak();
    }

    /**
     * -Xss2m
     * @param args
     */
    public static void main(String[] args) {
        JavaStackSOF sof = new JavaStackSOF();
        try {
            sof.stackLeak();
        }finally {
            System.out.println("stackLength:"+sof.stackLength);
        }
    }
}
